1. Field of the Invention
The present invention relates to a rangefinder apparatus and a camera equipped therewith.
2. Related Background Art
A rangefinder apparatus of a camera equipped with an AF sensor of passive type or the like captures an object by a pair of left and right line sensors, for example, so as to acquire left and right sensor images (AF data). A pair of window areas for acquiring a pair of AF data items used for correlation value computing from the AF data obtained by the pair of left and right line sensors are determined, and a pair of AF data items used for correlation value computing are successively acquired while shifting the pair of window areas in opposite directions within a pair of predetermined sensor regions (employed sensors). Alternatively, one of the window areas is fixed, and a pair of AF data items used for correlation value computing are successively acquired while shifting the other window area.
The correlation of thus obtained pair of AF data items is determined, and the object distance is computed according to the shift amount of window areas at the time of yielding the highest correlation (at the time when left and right sensor images within a pair of employed sensors coincide with each other) Specifically, the shift amount of window area yielding the highest correlation is a shift amount at which the correlation value attains a minimum value Though there may be cases where the highest correlation is obtained when the correlation value is at a maximum value depending on the method of computing correlation values, this specification explains a case where the highest correlation is obtained when the correlation value is at a minimum value. There are cases where a plurality of local minimum values exist. In such a case, the shift amount yielding the absolute minimum value is usually determined to be the shift amount with the highest correlation.
Japanese Patent No. 2707569 discloses the following rangefinder apparatus. The rangefinder apparatus adopts the first correlation local minimum value detected by shifting the window areas, and the reliability of the correlation local minimum value is determined according to the symmetry of the ratio of change in correlation value before and after the correlation local minimum value. A new local minimum value is obtained by interpolation from respective correlation values of shift positions before and after the correlation local minimum value, and the solution yielded by dividing the new minimum value by the higher ratio of change in the correlation values before and after the local minimum value is compared with a predetermined value, so as to determine the reliability of the new local minimum value.
When the initially chosen correlation local minimum value is determined to have a reliability by the two determination methods in the above-mentioned rangefinder apparatus, however, this correlation local minimum value is selected as data forming a basis for calculating the distance. Therefore, when a repeating pattern as shown in FIG. 10 is subjected to rangefinding, an initial local minimum value is adopted even though two local minimum values exist in shift regions 1 and 2, respectively, as depicted.
When it is determined to have a reliability since the ratio of change in correlation value around the initial shift position (area including a shift amount C1) has a predetermined degree of symmetry and the new local minimum value obtained by interpolation is at a reference value or lower as shown in FIG. 11, the correlation value computing does not reach an area where the absolute minimum value is supposed to exist (an area including a shift amount B1), and the initial shift position C1 is employed, whereby the rangefinding is in error.
As a technique for securing a reliability in the shift amount obtained, correlation value computing may be carried out in the whole region including the outside of a predetermined area, and the case where the shift amount exhibiting the highest correlation is on the outside of a predetermined area (e.g., area where the shift amount becomes smaller than that at infinity) may be determined to have a low reliability and considered to be a rangefinding error.
The window ranges are not shifted continuously but discretely, so that resulting correlation value data become discrete data. Therefore, even when a certain correlation value is determined to be the smallest local minimum value, it may differ from the true smallest local minimum value B as shown in FIG. 12. Hence, when a plurality of correlation local minimum values exist, the local minimum value C that should not be employed may be employed as the smallest local minimum value. Reliability of measurement is determined according to the shift amount C1 yielding the erroneous smallest local minimum value as shown in FIG. 12, where a rangefinding error is determined according to the shift amount B1 being considered normal. In the shift amount relationship shown in FIG. 13, by contrast, the rangefinding result to be originally determined normal according to the shift amount B1 is found to be a rangefinding error according to the shift amount C1.
For overcoming the problem mentioned above, it is an object of the present invention to provide a rangefinder apparatus which can suppress misjudgment of rangefinding errors, and a camera equipped therewith.
In view of the above-mentioned problem, the present invention provides a rangefinder apparatus comprising: AF data generating means for forming an image of light from an object to be subjected to rangefinding onto a pair of line sensors each including a plurality of light-receiving elements, and generating AF data for calculating a correlation value according to signals obtained from the light-receiving elements; AF data acquiring means for acquiring the AF data from a pair of employed sensor areas used for rangefinding in the pair of line sensors; correlation value computing means for determining a pair of window areas for selecting the AF data to be used for computing a correlation value within the pair of employed sensor areas, and successively computing correlation values while shifting the pair of window areas; interpolated correlation extreme (local minimum) value computing means for detecting at least one correlation extreme (local minimum) value from the correlation values computed by the correlation value computing means, and interpolating the correlation values so as to compute an interpolated correlation extreme (local minimum) value for each correlation extreme (local minimum) value; highest correlation value detecting means for detecting the highest correlation value exhibiting the highest correlation based on the interpolated correlation extreme (local minimum) value(s) computed by the interpolated correlation extreme (local minimum) value computing means; shift amount computing means for computing a shift amount of the window areas when the correlation of the window areas becomes highest; rangefinding error judging means for judging the validity of the shift amount computed by the shift amount computing means depending on whether the shift amount is outside of a predetermined range or not; and object distance calculating means for calculating a distance to the object according to the shift amount computed by the shift amount computing means.
The xe2x80x9cAF dataxe2x80x9d in the present invention include the light intensity data obtained from respective light-receiving elements and the data obtained by processing the light intensity data. Such data processing includes contrast extraction processing that is described in detail hereinafter.
In the case where a plurality of local minimum values of correlation values exist, even when there is an local minimum value outside of a predetermined area, the rangefinder apparatus of the present invention carries out interpolation computing for all the local minimum values and compares the plurality of local minimum values according to interpolated correlation values, whereby erroneous highest correlation values are less likely to be employed. Therefore, misjudgment of range finding errors in which those which are not rangefinding errors are mistaken as rangefinding errors and those which are rangefinding errors are mistaken as normal can be suppressed even in the case where rangefinding errors are determined according to the shift amount yielding the highest correlation value.
The present invention provides a camera equipped with the above-mentioned rangefinder apparatus. When a camera is equipped with a rangefinder apparatus which can suppress the misjudgment of rangefinding errors, it can restrain an unintended distance from coming into focus and rangefinding errors from being found more than necessary.